package com.chiffoyqc.utils;

import java.io.Closeable;
import java.io.IOException;

/**
 * Created by Administrator on 2017/6/19.
 */
public class CloseSource {

    public static <T extends Closeable> void closeCloseableSource(T ...sourceParams){
        for(T t : sourceParams){
            if(t != null){
                try {
                    t.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            t = null;
        }
    }

}
